package com.j256.ormlite.field;

import com.j256.ormlite.dao.BaseDaoImpl;
import com.j256.ormlite.dao.BaseForeignCollection;
import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.dao.DaoManager;
import com.j256.ormlite.dao.EagerForeignCollection;
import com.j256.ormlite.dao.ForeignCollection;
import com.j256.ormlite.dao.LazyForeignCollection;
import com.j256.ormlite.dao.ObjectCache;
import com.j256.ormlite.db.DatabaseType;
import com.j256.ormlite.misc.SqlExceptionUtil;
import com.j256.ormlite.stmt.mapped.MappedQueryForId;
import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.support.DatabaseConnection;
import com.j256.ormlite.support.DatabaseResults;
import com.j256.ormlite.table.DatabaseTableConfig;
import com.j256.ormlite.table.TableInfo;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Map;

public class FieldType
{
  private static boolean DEFAULT_VALUE_BOOLEAN = false;
  private static byte DEFAULT_VALUE_BYTE = 0;
  private static char DEFAULT_VALUE_CHAR = '\000';
  private static double DEFAULT_VALUE_DOUBLE = 0.0D;
  private static float DEFAULT_VALUE_FLOAT = 0.0F;
  private static int DEFAULT_VALUE_INT = 0;
  private static long DEFAULT_VALUE_LONG = 0L;
  private static short DEFAULT_VALUE_SHORT = 0;
  public static final String FOREIGN_ID_FIELD_SUFFIX = "_id";
  private static final ThreadLocal<LevelCounters> threadLevelCounters = new ThreadLocal()
  {
    protected FieldType.LevelCounters initialValue()
    {
      return new FieldType.LevelCounters(null);
    }
  };
  private final String columnName;
  private final ConnectionSource connectionSource;
  private DataPersister dataPersister;
  private Object dataTypeConfigObj;
  private Object defaultValue;
  private final Field field;
  private final DatabaseFieldConfig fieldConfig;
  private FieldConverter fieldConverter;
  private final Method fieldGetMethod;
  private final Method fieldSetMethod;
  private BaseDaoImpl<?, ?> foreignDao;
  private FieldType foreignFieldType;
  private FieldType foreignIdField;
  private TableInfo<?, ?> foreignTableInfo;
  private final String generatedIdSequence;
  private final boolean isGeneratedId;
  private final boolean isId;
  private MappedQueryForId<Object, Object> mappedQueryForId;
  private final Class<?> parentClass;
  private final String tableName;

  // ERROR //
  public FieldType(ConnectionSource paramConnectionSource, String paramString, Field paramField, DatabaseFieldConfig paramDatabaseFieldConfig, Class<?> paramClass)
    throws SQLException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 88	java/lang/Object:<init>	()V
    //   4: aload_0
    //   5: aload_1
    //   6: putfield 90	com/j256/ormlite/field/FieldType:connectionSource	Lcom/j256/ormlite/support/ConnectionSource;
    //   9: aload_0
    //   10: aload_2
    //   11: putfield 92	com/j256/ormlite/field/FieldType:tableName	Ljava/lang/String;
    //   14: aload_1
    //   15: invokeinterface 98 1 0
    //   20: astore 6
    //   22: aload_0
    //   23: aload_3
    //   24: putfield 100	com/j256/ormlite/field/FieldType:field	Ljava/lang/reflect/Field;
    //   27: aload_0
    //   28: aload 5
    //   30: putfield 102	com/j256/ormlite/field/FieldType:parentClass	Ljava/lang/Class;
    //   33: aload 4
    //   35: invokevirtual 107	com/j256/ormlite/field/DatabaseFieldConfig:postProcess	()V
    //   38: aload_3
    //   39: invokevirtual 113	java/lang/reflect/Field:getType	()Ljava/lang/Class;
    //   42: astore 7
    //   44: aload 4
    //   46: invokevirtual 117	com/j256/ormlite/field/DatabaseFieldConfig:getDataPersister	()Lcom/j256/ormlite/field/DataPersister;
    //   49: ifnonnull +302 -> 351
    //   52: aload 4
    //   54: invokevirtual 120	com/j256/ormlite/field/DatabaseFieldConfig:getPersisterClass	()Ljava/lang/Class;
    //   57: astore 20
    //   59: aload 20
    //   61: ifnull +10 -> 71
    //   64: aload 20
    //   66: ldc 122
    //   68: if_acmpne +100 -> 168
    //   71: aload_3
    //   72: invokestatic 128	com/j256/ormlite/field/DataPersisterManager:lookupForField	(Ljava/lang/reflect/Field;)Lcom/j256/ormlite/field/DataPersister;
    //   75: astore 8
    //   77: aload 4
    //   79: invokevirtual 132	com/j256/ormlite/field/DatabaseFieldConfig:getForeignColumnName	()Ljava/lang/String;
    //   82: astore 15
    //   84: aload_3
    //   85: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   88: astore 16
    //   90: aload 4
    //   92: invokevirtual 139	com/j256/ormlite/field/DatabaseFieldConfig:isForeign	()Z
    //   95: ifne +16 -> 111
    //   98: aload 4
    //   100: invokevirtual 142	com/j256/ormlite/field/DatabaseFieldConfig:isForeignAutoRefresh	()Z
    //   103: ifne +8 -> 111
    //   106: aload 15
    //   108: ifnull +489 -> 597
    //   111: aload 8
    //   113: ifnull +359 -> 472
    //   116: aload 8
    //   118: invokeinterface 147 1 0
    //   123: ifeq +349 -> 472
    //   126: new 149	java/lang/IllegalArgumentException
    //   129: dup
    //   130: new 151	java/lang/StringBuilder
    //   133: dup
    //   134: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   137: ldc 154
    //   139: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   142: aload_0
    //   143: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   146: ldc 163
    //   148: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   151: aload 7
    //   153: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   156: ldc 165
    //   158: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   161: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   164: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   167: athrow
    //   168: aload 20
    //   170: ldc 173
    //   172: iconst_0
    //   173: anewarray 175	java/lang/Class
    //   176: invokevirtual 179	java/lang/Class:getDeclaredMethod	(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
    //   179: astore 22
    //   181: aload 22
    //   183: aconst_null
    //   184: iconst_0
    //   185: anewarray 4	java/lang/Object
    //   188: invokevirtual 185	java/lang/reflect/Method:invoke	(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    //   191: astore 25
    //   193: aload 25
    //   195: ifnonnull +118 -> 313
    //   198: new 81	java/sql/SQLException
    //   201: dup
    //   202: new 151	java/lang/StringBuilder
    //   205: dup
    //   206: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   209: ldc 187
    //   211: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   214: aload 20
    //   216: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   219: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   222: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   225: athrow
    //   226: astore 21
    //   228: new 151	java/lang/StringBuilder
    //   231: dup
    //   232: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   235: ldc 190
    //   237: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   240: aload 20
    //   242: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   245: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   248: aload 21
    //   250: invokestatic 196	com/j256/ormlite/misc/SqlExceptionUtil:create	(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/sql/SQLException;
    //   253: athrow
    //   254: astore 24
    //   256: new 151	java/lang/StringBuilder
    //   259: dup
    //   260: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   263: ldc 198
    //   265: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   268: aload 20
    //   270: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   273: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   276: aload 24
    //   278: invokevirtual 202	java/lang/reflect/InvocationTargetException:getTargetException	()Ljava/lang/Throwable;
    //   281: invokestatic 196	com/j256/ormlite/misc/SqlExceptionUtil:create	(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/sql/SQLException;
    //   284: athrow
    //   285: astore 23
    //   287: new 151	java/lang/StringBuilder
    //   290: dup
    //   291: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   294: ldc 198
    //   296: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   299: aload 20
    //   301: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   304: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   307: aload 23
    //   309: invokestatic 196	com/j256/ormlite/misc/SqlExceptionUtil:create	(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/sql/SQLException;
    //   312: athrow
    //   313: aload 25
    //   315: checkcast 144	com/j256/ormlite/field/DataPersister
    //   318: astore 8
    //   320: goto -243 -> 77
    //   323: astore 26
    //   325: new 151	java/lang/StringBuilder
    //   328: dup
    //   329: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   332: ldc 204
    //   334: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   337: aload 20
    //   339: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   342: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   345: aload 26
    //   347: invokestatic 196	com/j256/ormlite/misc/SqlExceptionUtil:create	(Ljava/lang/String;Ljava/lang/Throwable;)Ljava/sql/SQLException;
    //   350: athrow
    //   351: aload 4
    //   353: invokevirtual 117	com/j256/ormlite/field/DatabaseFieldConfig:getDataPersister	()Lcom/j256/ormlite/field/DataPersister;
    //   356: astore 8
    //   358: aload 8
    //   360: aload_3
    //   361: invokeinterface 208 2 0
    //   366: ifne -289 -> 77
    //   369: new 151	java/lang/StringBuilder
    //   372: dup
    //   373: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   376: astore 9
    //   378: aload 9
    //   380: ldc 210
    //   382: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   385: aload 7
    //   387: invokevirtual 211	java/lang/Class:getName	()Ljava/lang/String;
    //   390: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   393: pop
    //   394: aload 9
    //   396: ldc 213
    //   398: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   401: aload_0
    //   402: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   405: pop
    //   406: aload 9
    //   408: ldc 215
    //   410: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   413: aload 8
    //   415: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   418: pop
    //   419: aload 8
    //   421: invokeinterface 218 1 0
    //   426: astore 13
    //   428: aload 13
    //   430: ifnull +29 -> 459
    //   433: aload 9
    //   435: new 151	java/lang/StringBuilder
    //   438: dup
    //   439: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   442: ldc 220
    //   444: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   447: aload 13
    //   449: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   452: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   455: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   458: pop
    //   459: new 149	java/lang/IllegalArgumentException
    //   462: dup
    //   463: aload 9
    //   465: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   468: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   471: athrow
    //   472: aload 15
    //   474: ifnonnull +93 -> 567
    //   477: new 151	java/lang/StringBuilder
    //   480: dup
    //   481: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   484: aload 16
    //   486: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   489: ldc 30
    //   491: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   494: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   497: astore 16
    //   499: ldc 222
    //   501: aload 7
    //   503: invokevirtual 226	java/lang/Class:isAssignableFrom	(Ljava/lang/Class;)Z
    //   506: ifeq +448 -> 954
    //   509: new 81	java/sql/SQLException
    //   512: dup
    //   513: new 151	java/lang/StringBuilder
    //   516: dup
    //   517: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   520: ldc 228
    //   522: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   525: aload_3
    //   526: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   529: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   532: ldc 230
    //   534: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   537: aload 7
    //   539: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   542: ldc 232
    //   544: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   547: ldc 234
    //   549: invokevirtual 237	java/lang/Class:getSimpleName	()Ljava/lang/String;
    //   552: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   555: ldc 239
    //   557: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   560: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   563: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   566: athrow
    //   567: new 151	java/lang/StringBuilder
    //   570: dup
    //   571: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   574: aload 16
    //   576: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   579: ldc 241
    //   581: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   584: aload 15
    //   586: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   589: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   592: astore 16
    //   594: goto -95 -> 499
    //   597: aload 4
    //   599: invokevirtual 244	com/j256/ormlite/field/DatabaseFieldConfig:isForeignCollection	()Z
    //   602: ifeq +168 -> 770
    //   605: aload 7
    //   607: ldc 246
    //   609: if_acmpeq +61 -> 670
    //   612: ldc 222
    //   614: aload 7
    //   616: invokevirtual 226	java/lang/Class:isAssignableFrom	(Ljava/lang/Class;)Z
    //   619: ifne +51 -> 670
    //   622: new 81	java/sql/SQLException
    //   625: dup
    //   626: new 151	java/lang/StringBuilder
    //   629: dup
    //   630: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   633: ldc 248
    //   635: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   638: aload_3
    //   639: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   642: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   645: ldc 250
    //   647: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   650: ldc 222
    //   652: invokevirtual 237	java/lang/Class:getSimpleName	()Ljava/lang/String;
    //   655: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   658: ldc 252
    //   660: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   663: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   666: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   669: athrow
    //   670: aload_3
    //   671: invokevirtual 256	java/lang/reflect/Field:getGenericType	()Ljava/lang/reflect/Type;
    //   674: astore 19
    //   676: aload 19
    //   678: instanceof 258
    //   681: ifne +39 -> 720
    //   684: new 81	java/sql/SQLException
    //   687: dup
    //   688: new 151	java/lang/StringBuilder
    //   691: dup
    //   692: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   695: ldc 248
    //   697: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   700: aload_3
    //   701: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   704: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   707: ldc_w 260
    //   710: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   713: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   716: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   719: athrow
    //   720: aload 19
    //   722: checkcast 258	java/lang/reflect/ParameterizedType
    //   725: invokeinterface 264 1 0
    //   730: arraylength
    //   731: ifne +223 -> 954
    //   734: new 81	java/sql/SQLException
    //   737: dup
    //   738: new 151	java/lang/StringBuilder
    //   741: dup
    //   742: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   745: ldc 248
    //   747: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   750: aload_3
    //   751: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   754: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   757: ldc_w 266
    //   760: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   763: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   766: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   769: athrow
    //   770: aload 8
    //   772: ifnonnull +182 -> 954
    //   775: aload 4
    //   777: invokevirtual 244	com/j256/ormlite/field/DatabaseFieldConfig:isForeignCollection	()Z
    //   780: ifne +174 -> 954
    //   783: ldc_w 268
    //   786: aload 7
    //   788: invokevirtual 226	java/lang/Class:isAssignableFrom	(Ljava/lang/Class;)Z
    //   791: ifeq +51 -> 842
    //   794: new 81	java/sql/SQLException
    //   797: dup
    //   798: new 151	java/lang/StringBuilder
    //   801: dup
    //   802: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   805: ldc_w 270
    //   808: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   811: aload 7
    //   813: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   816: ldc_w 272
    //   819: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   822: aload_3
    //   823: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   826: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   829: ldc_w 274
    //   832: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   835: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   838: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   841: athrow
    //   842: ldc_w 276
    //   845: aload 7
    //   847: invokevirtual 226	java/lang/Class:isAssignableFrom	(Ljava/lang/Class;)Z
    //   850: ifeq +57 -> 907
    //   853: new 81	java/sql/SQLException
    //   856: dup
    //   857: new 151	java/lang/StringBuilder
    //   860: dup
    //   861: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   864: ldc_w 270
    //   867: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   870: aload 7
    //   872: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   875: ldc_w 272
    //   878: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   881: aload_3
    //   882: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   885: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   888: ldc_w 278
    //   891: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   894: ldc_w 280
    //   897: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   900: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   903: invokespecial 188	java/sql/SQLException:<init>	(Ljava/lang/String;)V
    //   906: athrow
    //   907: new 149	java/lang/IllegalArgumentException
    //   910: dup
    //   911: new 151	java/lang/StringBuilder
    //   914: dup
    //   915: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   918: ldc_w 270
    //   921: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   924: aload 7
    //   926: invokevirtual 161	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    //   929: ldc 213
    //   931: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   934: aload_3
    //   935: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   938: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   941: ldc_w 282
    //   944: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   947: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   950: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   953: athrow
    //   954: aload 4
    //   956: invokevirtual 285	com/j256/ormlite/field/DatabaseFieldConfig:getColumnName	()Ljava/lang/String;
    //   959: ifnonnull +70 -> 1029
    //   962: aload_0
    //   963: aload 16
    //   965: putfield 287	com/j256/ormlite/field/FieldType:columnName	Ljava/lang/String;
    //   968: aload_0
    //   969: aload 4
    //   971: putfield 289	com/j256/ormlite/field/FieldType:fieldConfig	Lcom/j256/ormlite/field/DatabaseFieldConfig;
    //   974: aload 4
    //   976: invokevirtual 291	com/j256/ormlite/field/DatabaseFieldConfig:isId	()Z
    //   979: ifeq +137 -> 1116
    //   982: aload 4
    //   984: invokevirtual 293	com/j256/ormlite/field/DatabaseFieldConfig:isGeneratedId	()Z
    //   987: ifne +11 -> 998
    //   990: aload 4
    //   992: invokevirtual 296	com/j256/ormlite/field/DatabaseFieldConfig:getGeneratedIdSequence	()Ljava/lang/String;
    //   995: ifnull +46 -> 1041
    //   998: new 149	java/lang/IllegalArgumentException
    //   1001: dup
    //   1002: new 151	java/lang/StringBuilder
    //   1005: dup
    //   1006: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1009: ldc_w 298
    //   1012: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1015: aload_3
    //   1016: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1019: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1022: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1025: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1028: athrow
    //   1029: aload_0
    //   1030: aload 4
    //   1032: invokevirtual 285	com/j256/ormlite/field/DatabaseFieldConfig:getColumnName	()Ljava/lang/String;
    //   1035: putfield 287	com/j256/ormlite/field/FieldType:columnName	Ljava/lang/String;
    //   1038: goto -70 -> 968
    //   1041: aload_0
    //   1042: iconst_1
    //   1043: putfield 300	com/j256/ormlite/field/FieldType:isId	Z
    //   1046: aload_0
    //   1047: iconst_0
    //   1048: putfield 302	com/j256/ormlite/field/FieldType:isGeneratedId	Z
    //   1051: aload_0
    //   1052: aconst_null
    //   1053: putfield 304	com/j256/ormlite/field/FieldType:generatedIdSequence	Ljava/lang/String;
    //   1056: aload_0
    //   1057: getfield 300	com/j256/ormlite/field/FieldType:isId	Z
    //   1060: ifeq +216 -> 1276
    //   1063: aload 4
    //   1065: invokevirtual 139	com/j256/ormlite/field/DatabaseFieldConfig:isForeign	()Z
    //   1068: ifne +11 -> 1079
    //   1071: aload 4
    //   1073: invokevirtual 142	com/j256/ormlite/field/DatabaseFieldConfig:isForeignAutoRefresh	()Z
    //   1076: ifeq +200 -> 1276
    //   1079: new 149	java/lang/IllegalArgumentException
    //   1082: dup
    //   1083: new 151	java/lang/StringBuilder
    //   1086: dup
    //   1087: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1090: ldc_w 306
    //   1093: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1096: aload_3
    //   1097: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1100: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1103: ldc_w 308
    //   1106: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1109: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1112: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1115: athrow
    //   1116: aload 4
    //   1118: invokevirtual 293	com/j256/ormlite/field/DatabaseFieldConfig:isGeneratedId	()Z
    //   1121: ifeq +86 -> 1207
    //   1124: aload 4
    //   1126: invokevirtual 296	com/j256/ormlite/field/DatabaseFieldConfig:getGeneratedIdSequence	()Ljava/lang/String;
    //   1129: ifnull +34 -> 1163
    //   1132: new 149	java/lang/IllegalArgumentException
    //   1135: dup
    //   1136: new 151	java/lang/StringBuilder
    //   1139: dup
    //   1140: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1143: ldc_w 298
    //   1146: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1149: aload_3
    //   1150: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1153: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1156: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1159: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1162: athrow
    //   1163: aload_0
    //   1164: iconst_1
    //   1165: putfield 300	com/j256/ormlite/field/FieldType:isId	Z
    //   1168: aload_0
    //   1169: iconst_1
    //   1170: putfield 302	com/j256/ormlite/field/FieldType:isGeneratedId	Z
    //   1173: aload 6
    //   1175: invokeinterface 313 1 0
    //   1180: ifeq +19 -> 1199
    //   1183: aload_0
    //   1184: aload 6
    //   1186: aload_2
    //   1187: aload_0
    //   1188: invokeinterface 317 3 0
    //   1193: putfield 304	com/j256/ormlite/field/FieldType:generatedIdSequence	Ljava/lang/String;
    //   1196: goto -140 -> 1056
    //   1199: aload_0
    //   1200: aconst_null
    //   1201: putfield 304	com/j256/ormlite/field/FieldType:generatedIdSequence	Ljava/lang/String;
    //   1204: goto -148 -> 1056
    //   1207: aload 4
    //   1209: invokevirtual 296	com/j256/ormlite/field/DatabaseFieldConfig:getGeneratedIdSequence	()Ljava/lang/String;
    //   1212: ifnull +46 -> 1258
    //   1215: aload_0
    //   1216: iconst_1
    //   1217: putfield 300	com/j256/ormlite/field/FieldType:isId	Z
    //   1220: aload_0
    //   1221: iconst_1
    //   1222: putfield 302	com/j256/ormlite/field/FieldType:isGeneratedId	Z
    //   1225: aload 4
    //   1227: invokevirtual 296	com/j256/ormlite/field/DatabaseFieldConfig:getGeneratedIdSequence	()Ljava/lang/String;
    //   1230: astore 18
    //   1232: aload 6
    //   1234: invokeinterface 320 1 0
    //   1239: ifeq +10 -> 1249
    //   1242: aload 18
    //   1244: invokevirtual 325	java/lang/String:toUpperCase	()Ljava/lang/String;
    //   1247: astore 18
    //   1249: aload_0
    //   1250: aload 18
    //   1252: putfield 304	com/j256/ormlite/field/FieldType:generatedIdSequence	Ljava/lang/String;
    //   1255: goto -199 -> 1056
    //   1258: aload_0
    //   1259: iconst_0
    //   1260: putfield 300	com/j256/ormlite/field/FieldType:isId	Z
    //   1263: aload_0
    //   1264: iconst_0
    //   1265: putfield 302	com/j256/ormlite/field/FieldType:isGeneratedId	Z
    //   1268: aload_0
    //   1269: aconst_null
    //   1270: putfield 304	com/j256/ormlite/field/FieldType:generatedIdSequence	Ljava/lang/String;
    //   1273: goto -217 -> 1056
    //   1276: aload 4
    //   1278: invokevirtual 328	com/j256/ormlite/field/DatabaseFieldConfig:isUseGetSet	()Z
    //   1281: ifeq +73 -> 1354
    //   1284: aload_0
    //   1285: aload_3
    //   1286: iconst_1
    //   1287: invokestatic 332	com/j256/ormlite/field/DatabaseFieldConfig:findGetMethod	(Ljava/lang/reflect/Field;Z)Ljava/lang/reflect/Method;
    //   1290: putfield 334	com/j256/ormlite/field/FieldType:fieldGetMethod	Ljava/lang/reflect/Method;
    //   1293: aload_0
    //   1294: aload_3
    //   1295: iconst_1
    //   1296: invokestatic 337	com/j256/ormlite/field/DatabaseFieldConfig:findSetMethod	(Ljava/lang/reflect/Field;Z)Ljava/lang/reflect/Method;
    //   1299: putfield 339	com/j256/ormlite/field/FieldType:fieldSetMethod	Ljava/lang/reflect/Method;
    //   1302: aload 4
    //   1304: invokevirtual 342	com/j256/ormlite/field/DatabaseFieldConfig:isAllowGeneratedIdInsert	()Z
    //   1307: ifeq +114 -> 1421
    //   1310: aload 4
    //   1312: invokevirtual 293	com/j256/ormlite/field/DatabaseFieldConfig:isGeneratedId	()Z
    //   1315: ifne +106 -> 1421
    //   1318: new 149	java/lang/IllegalArgumentException
    //   1321: dup
    //   1322: new 151	java/lang/StringBuilder
    //   1325: dup
    //   1326: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1329: ldc 154
    //   1331: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1334: aload_3
    //   1335: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1338: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1341: ldc_w 344
    //   1344: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1347: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1350: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1353: athrow
    //   1354: aload_3
    //   1355: invokevirtual 347	java/lang/reflect/Field:isAccessible	()Z
    //   1358: ifne +11 -> 1369
    //   1361: aload_0
    //   1362: getfield 100	com/j256/ormlite/field/FieldType:field	Ljava/lang/reflect/Field;
    //   1365: iconst_1
    //   1366: invokevirtual 351	java/lang/reflect/Field:setAccessible	(Z)V
    //   1369: aload_0
    //   1370: aconst_null
    //   1371: putfield 334	com/j256/ormlite/field/FieldType:fieldGetMethod	Ljava/lang/reflect/Method;
    //   1374: aload_0
    //   1375: aconst_null
    //   1376: putfield 339	com/j256/ormlite/field/FieldType:fieldSetMethod	Ljava/lang/reflect/Method;
    //   1379: goto -77 -> 1302
    //   1382: astore 17
    //   1384: new 149	java/lang/IllegalArgumentException
    //   1387: dup
    //   1388: new 151	java/lang/StringBuilder
    //   1391: dup
    //   1392: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1395: ldc_w 353
    //   1398: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1401: aload_3
    //   1402: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1405: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1408: ldc_w 355
    //   1411: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1414: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1417: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1420: athrow
    //   1421: aload 4
    //   1423: invokevirtual 142	com/j256/ormlite/field/DatabaseFieldConfig:isForeignAutoRefresh	()Z
    //   1426: ifeq +47 -> 1473
    //   1429: aload 4
    //   1431: invokevirtual 139	com/j256/ormlite/field/DatabaseFieldConfig:isForeign	()Z
    //   1434: ifne +39 -> 1473
    //   1437: new 149	java/lang/IllegalArgumentException
    //   1440: dup
    //   1441: new 151	java/lang/StringBuilder
    //   1444: dup
    //   1445: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1448: ldc 154
    //   1450: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1453: aload_3
    //   1454: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1457: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1460: ldc_w 357
    //   1463: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1466: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1469: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1472: athrow
    //   1473: aload 4
    //   1475: invokevirtual 360	com/j256/ormlite/field/DatabaseFieldConfig:isForeignAutoCreate	()Z
    //   1478: ifeq +47 -> 1525
    //   1481: aload 4
    //   1483: invokevirtual 139	com/j256/ormlite/field/DatabaseFieldConfig:isForeign	()Z
    //   1486: ifne +39 -> 1525
    //   1489: new 149	java/lang/IllegalArgumentException
    //   1492: dup
    //   1493: new 151	java/lang/StringBuilder
    //   1496: dup
    //   1497: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1500: ldc 154
    //   1502: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1505: aload_3
    //   1506: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1509: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1512: ldc_w 362
    //   1515: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1518: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1521: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1524: athrow
    //   1525: aload 4
    //   1527: invokevirtual 132	com/j256/ormlite/field/DatabaseFieldConfig:getForeignColumnName	()Ljava/lang/String;
    //   1530: ifnull +47 -> 1577
    //   1533: aload 4
    //   1535: invokevirtual 139	com/j256/ormlite/field/DatabaseFieldConfig:isForeign	()Z
    //   1538: ifne +39 -> 1577
    //   1541: new 149	java/lang/IllegalArgumentException
    //   1544: dup
    //   1545: new 151	java/lang/StringBuilder
    //   1548: dup
    //   1549: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1552: ldc 154
    //   1554: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1557: aload_3
    //   1558: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1561: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1564: ldc_w 364
    //   1567: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1570: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1573: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1576: athrow
    //   1577: aload 4
    //   1579: invokevirtual 367	com/j256/ormlite/field/DatabaseFieldConfig:isVersion	()Z
    //   1582: ifeq +54 -> 1636
    //   1585: aload 8
    //   1587: ifnull +13 -> 1600
    //   1590: aload 8
    //   1592: invokeinterface 370 1 0
    //   1597: ifne +39 -> 1636
    //   1600: new 149	java/lang/IllegalArgumentException
    //   1603: dup
    //   1604: new 151	java/lang/StringBuilder
    //   1607: dup
    //   1608: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1611: ldc 154
    //   1613: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1616: aload_3
    //   1617: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1620: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1623: ldc_w 372
    //   1626: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1629: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1632: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1635: athrow
    //   1636: aload 4
    //   1638: invokevirtual 376	com/j256/ormlite/field/DatabaseFieldConfig:getMaxForeignAutoRefreshLevel	()I
    //   1641: ifle +47 -> 1688
    //   1644: aload 4
    //   1646: invokevirtual 142	com/j256/ormlite/field/DatabaseFieldConfig:isForeignAutoRefresh	()Z
    //   1649: ifne +39 -> 1688
    //   1652: new 149	java/lang/IllegalArgumentException
    //   1655: dup
    //   1656: new 151	java/lang/StringBuilder
    //   1659: dup
    //   1660: invokespecial 152	java/lang/StringBuilder:<init>	()V
    //   1663: ldc 154
    //   1665: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1668: aload_3
    //   1669: invokevirtual 135	java/lang/reflect/Field:getName	()Ljava/lang/String;
    //   1672: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1675: ldc_w 378
    //   1678: invokevirtual 158	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   1681: invokevirtual 168	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   1684: invokespecial 171	java/lang/IllegalArgumentException:<init>	(Ljava/lang/String;)V
    //   1687: athrow
    //   1688: aload_0
    //   1689: aload 6
    //   1691: aload 8
    //   1693: invokespecial 382	com/j256/ormlite/field/FieldType:assignDataType	(Lcom/j256/ormlite/db/DatabaseType;Lcom/j256/ormlite/field/DataPersister;)V
    //   1696: return
    //
    // Exception table:
    //   from	to	target	type
    //   168	181	226	java/lang/Exception
    //   181	193	254	java/lang/reflect/InvocationTargetException
    //   181	193	285	java/lang/Exception
    //   313	320	323	java/lang/Exception
    //   1361	1369	1382	java/lang/SecurityException
  }

  private void assignDataType(DatabaseType paramDatabaseType, DataPersister paramDataPersister)
    throws SQLException
  {
    this.dataPersister = paramDataPersister;
    String str;
    if (paramDataPersister == null)
    {
      if ((!this.fieldConfig.isForeign()) && (!this.fieldConfig.isForeignCollection()))
        throw new SQLException("Data persister for field " + this + " is null but the field is not a foreign or foreignCollection");
    }
    else
    {
      this.fieldConverter = paramDatabaseType.getFieldConverter(paramDataPersister);
      if ((this.isGeneratedId) && (!paramDataPersister.isValidGeneratedType()))
      {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append("Generated-id field '").append(this.field.getName());
        localStringBuilder.append("' in ").append(this.field.getDeclaringClass().getSimpleName());
        localStringBuilder.append(" can't be type ").append(this.dataPersister.getSqlType());
        localStringBuilder.append(".  Must be one of: ");
        for (DataType localDataType : DataType.values())
        {
          DataPersister localDataPersister = localDataType.getDataPersister();
          if ((localDataPersister != null) && (localDataPersister.isValidGeneratedType()))
            localStringBuilder.append(localDataType).append(' ');
        }
        throw new IllegalArgumentException(localStringBuilder.toString());
      }
      if ((this.fieldConfig.isThrowIfNull()) && (!paramDataPersister.isPrimitive()))
        throw new SQLException("Field " + this.field.getName() + " must be a primitive if set with throwIfNull");
      if ((this.isId) && (!paramDataPersister.isAppropriateId()))
        throw new SQLException("Field '" + this.field.getName() + "' is of data type " + paramDataPersister + " which cannot be the ID field");
      this.dataTypeConfigObj = paramDataPersister.makeConfigObject(this);
      str = this.fieldConfig.getDefaultValue();
      if (str != null)
        break label403;
      this.defaultValue = null;
    }
    return;
    label403: if (this.isGeneratedId)
      throw new SQLException("Field '" + this.field.getName() + "' cannot be a generatedId and have a default value '" + str + "'");
    this.defaultValue = this.fieldConverter.parseDefaultString(this, str);
  }

  public static FieldType createFieldType(ConnectionSource paramConnectionSource, String paramString, Field paramField, Class<?> paramClass)
    throws SQLException
  {
    DatabaseFieldConfig localDatabaseFieldConfig = DatabaseFieldConfig.fromField(paramConnectionSource.getDatabaseType(), paramString, paramField);
    if (localDatabaseFieldConfig == null)
      return null;
    return new FieldType(paramConnectionSource, paramString, paramField, localDatabaseFieldConfig, paramClass);
  }

  private FieldType findForeignFieldType(Class<?> paramClass1, Class<?> paramClass2, BaseDaoImpl<?, ?> paramBaseDaoImpl)
    throws SQLException
  {
    String str = this.fieldConfig.getForeignCollectionForeignFieldName();
    FieldType localFieldType;
    for (localFieldType : paramBaseDaoImpl.getTableInfo().getFieldTypes())
      if ((localFieldType.getType() == paramClass2) && ((str == null) || (localFieldType.getField().getName().equals(str))))
      {
        if ((localFieldType.fieldConfig.isForeign()) || (localFieldType.fieldConfig.isForeignAutoRefresh()))
          break label261;
        throw new SQLException("Foreign collection object " + paramClass1 + " for field '" + this.field.getName() + "' contains a field of class " + paramClass2 + " but it's not foreign");
      }
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("Foreign collection class ").append(paramClass1.getName());
    localStringBuilder.append(" for field '").append(this.field.getName()).append("' column-name does not contain a foreign field");
    if (str != null)
      localStringBuilder.append(" named '").append(str).append('\'');
    localStringBuilder.append(" of class ").append(paramClass2.getName());
    throw new SQLException(localStringBuilder.toString());
    label261: return localFieldType;
  }

  private boolean isFieldValueDefault(Object paramObject)
  {
    if (paramObject == null)
      return true;
    return paramObject.equals(getJavaDefaultValueDefault());
  }

  public void assignField(Object paramObject1, Object paramObject2, boolean paramBoolean, ObjectCache paramObjectCache)
    throws SQLException
  {
    ObjectCache localObjectCache;
    Object localObject2;
    if ((this.foreignIdField != null) && (paramObject2 != null))
    {
      Object localObject1 = extractJavaFieldValue(paramObject1);
      if ((localObject1 != null) && (localObject1.equals(paramObject2)))
        return;
      localObjectCache = this.foreignDao.getObjectCache();
      if (localObjectCache != null)
        break label113;
      localObject2 = null;
    }
    while (true)
      if (localObject2 != null)
      {
        paramObject2 = localObject2;
        label58: if (this.fieldSetMethod != null)
          break;
      }
      else
      {
        try
        {
          this.field.set(paramObject1, paramObject2);
          return;
        }
        catch (IllegalArgumentException localIllegalArgumentException)
        {
          throw SqlExceptionUtil.create("Could not assign object '" + paramObject2 + "' to field " + this, localIllegalArgumentException);
          localObject2 = localObjectCache.get(getType(), paramObject2);
          continue;
          if (paramBoolean)
            break label58;
          LevelCounters localLevelCounters = (LevelCounters)threadLevelCounters.get();
          if (localLevelCounters.autoRefreshLevel == 0)
            localLevelCounters.autoRefreshLevelMax = this.fieldConfig.getMaxForeignAutoRefreshLevel();
          Object localObject6;
          if (localLevelCounters.autoRefreshLevel >= localLevelCounters.autoRefreshLevelMax)
          {
            localObject6 = this.foreignTableInfo.createObject();
            this.foreignIdField.assignField(localObject6, paramObject2, false, paramObjectCache);
            label200: paramObject2 = localObject6;
            break label58;
          }
          if (this.mappedQueryForId == null)
            this.mappedQueryForId = MappedQueryForId.build(this.connectionSource.getDatabaseType(), this.foreignDao.getTableInfo(), this.foreignIdField);
          localLevelCounters.autoRefreshLevel = (1 + localLevelCounters.autoRefreshLevel);
          try
          {
            localDatabaseConnection = this.connectionSource.getReadOnlyConnection();
          }
          finally
          {
            try
            {
              Object localObject5 = this.mappedQueryForId.execute(localDatabaseConnection, paramObject2, paramObjectCache);
              localObject6 = localObject5;
              this.connectionSource.releaseConnection(localDatabaseConnection);
              localLevelCounters.autoRefreshLevel = (-1 + localLevelCounters.autoRefreshLevel);
              if (localLevelCounters.autoRefreshLevel > 0)
                break label200;
              threadLevelCounters.remove();
            }
            finally
            {
              DatabaseConnection localDatabaseConnection;
              this.connectionSource.releaseConnection(localDatabaseConnection);
            }
            localLevelCounters.autoRefreshLevel = (-1 + localLevelCounters.autoRefreshLevel);
            if (localLevelCounters.autoRefreshLevel <= 0)
              threadLevelCounters.remove();
          }
        }
        catch (IllegalAccessException localIllegalAccessException)
        {
          label113: throw SqlExceptionUtil.create("Could not assign object '" + paramObject2 + "' to field " + this, localIllegalAccessException);
        }
      }
    try
    {
      this.fieldSetMethod.invoke(paramObject1, new Object[] { paramObject2 });
      return;
    }
    catch (Exception localException)
    {
      throw SqlExceptionUtil.create("Could not call " + this.fieldSetMethod + " on object with '" + paramObject2 + "' for " + this, localException);
    }
  }

  public Object assignIdValue(Object paramObject, Number paramNumber, ObjectCache paramObjectCache)
    throws SQLException
  {
    Object localObject = this.dataPersister.convertIdNumber(paramNumber);
    if (localObject == null)
      throw new SQLException("Invalid class " + this.dataPersister + " for sequence-id " + this);
    assignField(paramObject, localObject, false, paramObjectCache);
    return localObject;
  }

  public <FT, FID> BaseForeignCollection<FT, FID> buildForeignCollection(Object paramObject, FID paramFID)
    throws SQLException
  {
    if (this.foreignFieldType == null)
      return null;
    BaseDaoImpl localBaseDaoImpl = this.foreignDao;
    if (!this.fieldConfig.isForeignCollectionEager())
      return new LazyForeignCollection(localBaseDaoImpl, paramObject, paramFID, this.foreignFieldType, this.fieldConfig.getForeignCollectionOrderColumnName(), this.fieldConfig.isForeignCollectionOrderAscending());
    LevelCounters localLevelCounters = (LevelCounters)threadLevelCounters.get();
    if (localLevelCounters.foreignCollectionLevel == 0)
      localLevelCounters.foreignCollectionLevelMax = this.fieldConfig.getForeignCollectionMaxEagerLevel();
    if (localLevelCounters.foreignCollectionLevel >= localLevelCounters.foreignCollectionLevelMax)
      return new LazyForeignCollection(localBaseDaoImpl, paramObject, paramFID, this.foreignFieldType, this.fieldConfig.getForeignCollectionOrderColumnName(), this.fieldConfig.isForeignCollectionOrderAscending());
    localLevelCounters.foreignCollectionLevel = (1 + localLevelCounters.foreignCollectionLevel);
    try
    {
      EagerForeignCollection localEagerForeignCollection = new EagerForeignCollection(localBaseDaoImpl, paramObject, paramFID, this.foreignFieldType, this.fieldConfig.getForeignCollectionOrderColumnName(), this.fieldConfig.isForeignCollectionOrderAscending());
      return localEagerForeignCollection;
    }
    finally
    {
      localLevelCounters.foreignCollectionLevel = (-1 + localLevelCounters.foreignCollectionLevel);
    }
  }

  public void configDaoInformation(ConnectionSource paramConnectionSource, Class<?> paramClass)
    throws SQLException
  {
    Class localClass1 = this.field.getType();
    DatabaseType localDatabaseType = paramConnectionSource.getDatabaseType();
    String str = this.fieldConfig.getForeignColumnName();
    Object localObject;
    TableInfo localTableInfo;
    FieldType localFieldType1;
    label208: MappedQueryForId localMappedQueryForId;
    FieldType localFieldType2;
    if ((this.fieldConfig.isForeignAutoRefresh()) || (str != null))
    {
      DatabaseTableConfig localDatabaseTableConfig1 = this.fieldConfig.getForeignTableConfig();
      if (localDatabaseTableConfig1 == null)
        localObject = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localClass1);
      for (localTableInfo = ((BaseDaoImpl)localObject).getTableInfo(); str == null; localTableInfo = ((BaseDaoImpl)localObject).getTableInfo())
      {
        localFieldType1 = localTableInfo.getIdField();
        if (localFieldType1 != null)
          break label208;
        throw new IllegalArgumentException("Foreign field " + localClass1 + " does not have id field");
        localDatabaseTableConfig1.extractFieldTypes(paramConnectionSource);
        localObject = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localDatabaseTableConfig1);
      }
      localFieldType1 = localTableInfo.getFieldTypeByColumnName(str);
      if (localFieldType1 == null)
        throw new IllegalArgumentException("Foreign field " + localClass1 + " does not have field named '" + str + "'");
      localMappedQueryForId = MappedQueryForId.build(localDatabaseType, localTableInfo, localFieldType1);
      localFieldType2 = null;
    }
    while (true)
    {
      this.mappedQueryForId = localMappedQueryForId;
      this.foreignTableInfo = localTableInfo;
      this.foreignFieldType = localFieldType2;
      this.foreignDao = ((BaseDaoImpl)localObject);
      this.foreignIdField = localFieldType1;
      if (this.foreignIdField != null)
        assignDataType(localDatabaseType, this.foreignIdField.getDataPersister());
      return;
      if (this.fieldConfig.isForeign())
      {
        if ((this.dataPersister != null) && (this.dataPersister.isPrimitive()))
          throw new IllegalArgumentException("Field " + this + " is a primitive class " + localClass1 + " but marked as foreign");
        DatabaseTableConfig localDatabaseTableConfig3 = this.fieldConfig.getForeignTableConfig();
        if (localDatabaseTableConfig3 != null)
          localDatabaseTableConfig3.extractFieldTypes(paramConnectionSource);
        for (localObject = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localDatabaseTableConfig3); ; localObject = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localClass1))
        {
          localTableInfo = ((BaseDaoImpl)localObject).getTableInfo();
          localFieldType1 = localTableInfo.getIdField();
          if (localFieldType1 != null)
            break;
          throw new IllegalArgumentException("Foreign field " + localClass1 + " does not have id field");
        }
        if ((isForeignAutoCreate()) && (!localFieldType1.isGeneratedId()))
          throw new IllegalArgumentException("Field " + this.field.getName() + ", if foreignAutoCreate = true then class " + localClass1.getSimpleName() + " must have id field with generatedId = true");
        localFieldType2 = null;
        localMappedQueryForId = null;
      }
      else
      {
        if (this.fieldConfig.isForeignCollection())
        {
          if ((localClass1 != Collection.class) && (!ForeignCollection.class.isAssignableFrom(localClass1)))
            throw new SQLException("Field class for '" + this.field.getName() + "' must be of class " + ForeignCollection.class.getSimpleName() + " or Collection.");
          Type localType = this.field.getGenericType();
          if (!(localType instanceof ParameterizedType))
            throw new SQLException("Field class for '" + this.field.getName() + "' must be a parameterized Collection.");
          Type[] arrayOfType = ((ParameterizedType)localType).getActualTypeArguments();
          if (arrayOfType.length == 0)
            throw new SQLException("Field class for '" + this.field.getName() + "' must be a parameterized Collection with at least 1 type.");
          if (!(arrayOfType[0] instanceof Class))
            throw new SQLException("Field class for '" + this.field.getName() + "' must be a parameterized Collection whose generic argument is an entity class not: " + arrayOfType[0]);
          Class localClass2 = (Class)arrayOfType[0];
          DatabaseTableConfig localDatabaseTableConfig2 = this.fieldConfig.getForeignTableConfig();
          if (localDatabaseTableConfig2 == null);
          for (BaseDaoImpl localBaseDaoImpl = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localClass2); ; localBaseDaoImpl = (BaseDaoImpl)DaoManager.createDao(paramConnectionSource, localDatabaseTableConfig2))
          {
            localObject = localBaseDaoImpl;
            localFieldType2 = findForeignFieldType(localClass2, paramClass, localBaseDaoImpl);
            localFieldType1 = null;
            localTableInfo = null;
            localMappedQueryForId = null;
            break;
          }
        }
        localObject = null;
        localFieldType2 = null;
        localFieldType1 = null;
        localTableInfo = null;
        localMappedQueryForId = null;
      }
    }
  }

  public Object convertJavaFieldToSqlArgValue(Object paramObject)
    throws SQLException
  {
    if (paramObject == null)
      return null;
    return this.fieldConverter.javaToSqlArg(this, paramObject);
  }

  public Object convertStringToJavaField(String paramString, int paramInt)
    throws SQLException
  {
    if (paramString == null)
      return null;
    return this.fieldConverter.resultStringToJava(this, paramString, paramInt);
  }

  public <T> int createWithForeignDao(T paramT)
    throws SQLException
  {
    return this.foreignDao.create(paramT);
  }

  public boolean equals(Object paramObject)
  {
    if ((paramObject == null) || (paramObject.getClass() != getClass()));
    FieldType localFieldType;
    do
    {
      do
      {
        return false;
        localFieldType = (FieldType)paramObject;
      }
      while (!this.field.equals(localFieldType.field));
      if (this.parentClass != null)
        break;
    }
    while (localFieldType.parentClass != null);
    while (true)
    {
      return true;
      if (!this.parentClass.equals(localFieldType.parentClass))
        break;
    }
  }

  public Object extractJavaFieldToSqlArgValue(Object paramObject)
    throws SQLException
  {
    return convertJavaFieldToSqlArgValue(extractJavaFieldValue(paramObject));
  }

  public Object extractJavaFieldValue(Object paramObject)
    throws SQLException
  {
    Object localObject = extractRawJavaFieldValue(paramObject);
    if ((this.foreignIdField != null) && (localObject != null))
      localObject = this.foreignIdField.extractRawJavaFieldValue(localObject);
    return localObject;
  }

  public <FV> FV extractRawJavaFieldValue(Object paramObject)
    throws SQLException
  {
    if (this.fieldGetMethod == null);
    while (true)
    {
      Object localObject2;
      try
      {
        Object localObject3 = this.field.get(paramObject);
        localObject2 = localObject3;
        return localObject2;
      }
      catch (Exception localException2)
      {
        throw SqlExceptionUtil.create("Could not get field value for " + this, localException2);
      }
      try
      {
        Object localObject1 = this.fieldGetMethod.invoke(paramObject, new Object[0]);
        localObject2 = localObject1;
      }
      catch (Exception localException1)
      {
        throw SqlExceptionUtil.create("Could not call " + this.fieldGetMethod + " for " + this, localException1);
      }
    }
  }

  public Object generateId()
  {
    return this.dataPersister.generateId();
  }

  public String getColumnDefinition()
  {
    return this.fieldConfig.getColumnDefinition();
  }

  public String getColumnName()
  {
    return this.columnName;
  }

  public DataPersister getDataPersister()
  {
    return this.dataPersister;
  }

  public Object getDataTypeConfigObj()
  {
    return this.dataTypeConfigObj;
  }

  public Object getDefaultValue()
  {
    return this.defaultValue;
  }

  public Field getField()
  {
    return this.field;
  }

  public String getFieldName()
  {
    return this.field.getName();
  }

  public <FV> FV getFieldValueIfNotDefault(Object paramObject)
    throws SQLException
  {
    Object localObject = extractJavaFieldValue(paramObject);
    if (isFieldValueDefault(localObject))
      localObject = null;
    return localObject;
  }

  public FieldType getForeignIdField()
  {
    return this.foreignIdField;
  }

  public String getFormat()
  {
    return this.fieldConfig.getFormat();
  }

  public String getGeneratedIdSequence()
  {
    return this.generatedIdSequence;
  }

  public String getIndexName()
  {
    return this.fieldConfig.getIndexName(this.tableName);
  }

  public Object getJavaDefaultValueDefault()
  {
    if (this.field.getType() == Boolean.TYPE)
      return Boolean.valueOf(DEFAULT_VALUE_BOOLEAN);
    if ((this.field.getType() == Byte.TYPE) || (this.field.getType() == Byte.class))
      return Byte.valueOf(DEFAULT_VALUE_BYTE);
    if ((this.field.getType() == Character.TYPE) || (this.field.getType() == Character.class))
      return Character.valueOf(DEFAULT_VALUE_CHAR);
    if ((this.field.getType() == Short.TYPE) || (this.field.getType() == Short.class))
      return Short.valueOf(DEFAULT_VALUE_SHORT);
    if ((this.field.getType() == Integer.TYPE) || (this.field.getType() == Integer.class))
      return Integer.valueOf(DEFAULT_VALUE_INT);
    if ((this.field.getType() == Long.TYPE) || (this.field.getType() == Long.class))
      return Long.valueOf(DEFAULT_VALUE_LONG);
    if ((this.field.getType() == Float.TYPE) || (this.field.getType() == Float.class))
      return Float.valueOf(DEFAULT_VALUE_FLOAT);
    if ((this.field.getType() == Double.TYPE) || (this.field.getType() == Double.class))
      return Double.valueOf(DEFAULT_VALUE_DOUBLE);
    return null;
  }

  public SqlType getSqlType()
  {
    return this.fieldConverter.getSqlType();
  }

  public String getTableName()
  {
    return this.tableName;
  }

  public Class<?> getType()
  {
    return this.field.getType();
  }

  public String getUniqueIndexName()
  {
    return this.fieldConfig.getUniqueIndexName(this.tableName);
  }

  public Enum<?> getUnknownEnumVal()
  {
    return this.fieldConfig.getUnknownEnumValue();
  }

  public int getWidth()
  {
    return this.fieldConfig.getWidth();
  }

  public int hashCode()
  {
    return this.field.hashCode();
  }

  public boolean isAllowGeneratedIdInsert()
  {
    return this.fieldConfig.isAllowGeneratedIdInsert();
  }

  public boolean isArgumentHolderRequired()
  {
    return this.dataPersister.isArgumentHolderRequired();
  }

  public boolean isCanBeNull()
  {
    return this.fieldConfig.isCanBeNull();
  }

  public boolean isComparable()
    throws SQLException
  {
    if (this.fieldConfig.isForeignCollection())
      return false;
    if (this.dataPersister == null)
      throw new SQLException("Internal error.  Data-persister is not configured for field.  Please post _full_ exception with associated data objects to mailing list: " + this);
    return this.dataPersister.isComparable();
  }

  public boolean isEscapedDefaultValue()
  {
    return this.dataPersister.isEscapedDefaultValue();
  }

  public boolean isEscapedValue()
  {
    return this.dataPersister.isEscapedValue();
  }

  public boolean isForeign()
  {
    return this.fieldConfig.isForeign();
  }

  public boolean isForeignAutoCreate()
  {
    return this.fieldConfig.isForeignAutoCreate();
  }

  public boolean isForeignCollection()
  {
    return this.fieldConfig.isForeignCollection();
  }

  public boolean isGeneratedId()
  {
    return this.isGeneratedId;
  }

  public boolean isGeneratedIdSequence()
  {
    return this.generatedIdSequence != null;
  }

  public boolean isId()
  {
    return this.isId;
  }

  public boolean isObjectsFieldValueDefault(Object paramObject)
    throws SQLException
  {
    return isFieldValueDefault(extractJavaFieldValue(paramObject));
  }

  public boolean isReadOnly()
  {
    return this.fieldConfig.isReadOnly();
  }

  public boolean isSelfGeneratedId()
  {
    return this.dataPersister.isSelfGeneratedId();
  }

  public boolean isUnique()
  {
    return this.fieldConfig.isUnique();
  }

  public boolean isUniqueCombo()
  {
    return this.fieldConfig.isUniqueCombo();
  }

  public boolean isVersion()
  {
    return this.fieldConfig.isVersion();
  }

  public Object moveToNextValue(Object paramObject)
  {
    if (this.dataPersister == null)
      return null;
    return this.dataPersister.moveToNextValue(paramObject);
  }

  public <T> T resultToJava(DatabaseResults paramDatabaseResults, Map<String, Integer> paramMap)
    throws SQLException
  {
    Integer localInteger = (Integer)paramMap.get(this.columnName);
    if (localInteger == null)
    {
      localInteger = Integer.valueOf(paramDatabaseResults.findColumn(this.columnName));
      paramMap.put(this.columnName, localInteger);
    }
    Object localObject = this.fieldConverter.resultToJava(this, paramDatabaseResults, localInteger.intValue());
    if (this.fieldConfig.isForeign())
      if (paramDatabaseResults.wasNull(localInteger.intValue()))
        localObject = null;
    do
    {
      do
      {
        return localObject;
        if (!this.dataPersister.isPrimitive())
          break;
      }
      while ((!this.fieldConfig.isThrowIfNull()) || (!paramDatabaseResults.wasNull(localInteger.intValue())));
      throw new SQLException("Results value for primitive field '" + this.field.getName() + "' was an invalid null value");
    }
    while ((this.fieldConverter.isStreamType()) || (!paramDatabaseResults.wasNull(localInteger.intValue())));
    return null;
  }

  public String toString()
  {
    return getClass().getSimpleName() + ":name=" + this.field.getName() + ",class=" + this.field.getDeclaringClass().getSimpleName();
  }

  private static class LevelCounters
  {
    int autoRefreshLevel;
    int autoRefreshLevelMax;
    int foreignCollectionLevel;
    int foreignCollectionLevelMax;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.j256.ormlite.field.FieldType
 * JD-Core Version:    0.6.2
 */